<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Disjoint Stable Set Problems - Formulations by Representatives and Combinatorial Solvers: combsolvers/CombStabSolvers.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Disjoint Stable Set Problems - Formulations by Representatives and Combinatorial Solvers
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_f30362376b2f940437069cdd83d7f430.html">combsolvers</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">CombStabSolvers.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="CombStabSolvers_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * StabSolvers.h</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> *  Created on: Sep 19, 2011</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *      Author: correa</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#ifndef COMBSTABSOLVERS_H_</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define COMBSTABSOLVERS_H_</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="Graph_8h.html" title="A data structure representing a Simple Graph.">Graph.h</a>&gt;</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;StabSolver.h&gt;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &lt;pthread.h&gt;</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="repository_8h.html">repository.h</a>&gt;</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div>
<div class="line"><a name="l00016"></a><span class="lineno"><a class="code" href="classBackTracking.html">   16</a></span>&#160;<span class="keyword">class </span><a class="code" href="classBackTracking.html">BackTracking</a> : <span class="keyword">public</span> <a class="code" href="classBackTracking.html#ab4d3f37d355ac5231816d8034eb09c8a">StabSolver</a> {</div>
<div class="line"><a name="l00017"></a><span class="lineno"><a class="code" href="classBackTracking.html#ab4d3f37d355ac5231816d8034eb09c8a">   17</a></span>&#160;        <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classBackTracking.html#ab4d3f37d355ac5231816d8034eb09c8a">StabSolver</a>;</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;        <span class="keyword">friend</span> <span class="keywordtype">void</span> * <a class="code" href="classBackTracking.html#adb6a024619da71d8e20777a1365da42e">BT_Sync_multiEnumerate</a>(<span class="keywordtype">void</span> * bt_p);</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;        <span class="keyword">friend</span> <span class="keywordtype">void</span> * <a class="code" href="classBackTracking.html#af85f622e0ef71484e78cf7d27ef19ae8">BT_Async_multiEnumerate</a>(<span class="keywordtype">void</span> * bt_p);</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;</div>
<div class="line"><a name="l00021"></a><span class="lineno"><a class="code" href="classBackTracking.html#a109855a8f4b5efde12f6b8fc200c8e92">   21</a></span>&#160;        SubpModeler *           <a class="code" href="classBackTracking.html#a109855a8f4b5efde12f6b8fc200c8e92">sg</a>;</div>
<div class="line"><a name="l00022"></a><span class="lineno"><a class="code" href="classBackTracking.html#a21c7fdafd4875d1d3796f1067e4ca2ec">   22</a></span>&#160;        SubpModeler **          <a class="code" href="classBackTracking.html#a21c7fdafd4875d1d3796f1067e4ca2ec">psg</a>;</div>
<div class="line"><a name="l00023"></a><span class="lineno"><a class="code" href="classBackTracking.html#ac3800b9a442b688c093204c3c89e0ade">   23</a></span>&#160;        <span class="keywordtype">long</span> <span class="keywordtype">long</span>                       <a class="code" href="classBackTracking.html#ac3800b9a442b688c093204c3c89e0ade">nnodes</a>;</div>
<div class="line"><a name="l00024"></a><span class="lineno"><a class="code" href="classBackTracking.html#a942d6b0b33f96e4c1acae3754b53b114">   24</a></span>&#160;        <span class="keywordtype">int</span>                                     <a class="code" href="classBackTracking.html#a942d6b0b33f96e4c1acae3754b53b114">tindex</a>;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div>
<div class="line"><a name="l00026"></a><span class="lineno"><a class="code" href="classBackTracking.html#a25573f712ae36023c69ba2e36b1b22f4">   26</a></span>&#160;        <span class="keywordtype">void</span> *                          <a class="code" href="classBackTracking.html#a25573f712ae36023c69ba2e36b1b22f4">rootsubp</a>;</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="code" href="classBackTracking.html#ac6e04082dcf05ec10c0cd0b097857884">   28</a></span>&#160;        <span class="keywordtype">int</span>                                     <a class="code" href="classBackTracking.html#ac6e04082dcf05ec10c0cd0b097857884">nthreads</a>;</div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="code" href="classBackTracking.html#a33c0cf298c8be89aacc9794c08b7066f">   29</a></span>&#160;        pthread_mutex_t         <a class="code" href="classBackTracking.html#a33c0cf298c8be89aacc9794c08b7066f">mutex</a>;</div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="code" href="classBackTracking.html#aaa27b31230d74cb716a7ff68e82e2f73">   30</a></span>&#160;        pthread_cond_t          <a class="code" href="classBackTracking.html#aaa27b31230d74cb716a7ff68e82e2f73">cond</a>;</div>
<div class="line"><a name="l00031"></a><span class="lineno"><a class="code" href="classBackTracking.html#aa8b769f4c7b762ee90d849d4c94ea90f">   31</a></span>&#160;        pthread_barrier_t       <a class="code" href="classBackTracking.html#aa8b769f4c7b762ee90d849d4c94ea90f">barrier</a>;</div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="code" href="classBackTracking.html#adb0c61d49b728a86341047f99ae693b5">   32</a></span>&#160;        pthread_t *             <a class="code" href="classBackTracking.html#adb0c61d49b728a86341047f99ae693b5">thread</a>;</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;        <span class="keyword">template</span> &lt;<span class="keyword">class</span> M, <span class="keyword">class</span> G&gt;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;        <a class="code" href="classBackTracking.html#a2ac6305844013cb8dee57eff82bda42c">BackTracking</a>(G * g, ModelerFactory&lt;M,G&gt; * fm);</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <span class="keyword">template</span> &lt;<span class="keyword">class</span> M, <span class="keyword">class</span> G&gt;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        <a class="code" href="classBackTracking.html#a2ac6305844013cb8dee57eff82bda42c">BackTracking</a>(G * g, ModelerFactory&lt;M,G&gt; * fm, <span class="keywordtype">int</span> nt);</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="comment">//      BackTracking(Graph * g, Weight&lt;double&gt; * w);</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        <span class="keyword">virtual</span> <a class="code" href="classBackTracking.html#ae74224f3172b2344143cc362b4d777a0">~BackTracking</a>();</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;        <span class="keywordtype">int</span> <a class="code" href="classBackTracking.html#aa32c4e5f6c4b007d796dd18aaec5865a">solveByEnumeration</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * outfilename);</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;        <span class="keywordtype">int</span> <a class="code" href="classBackTracking.html#a3287288ab81a19132153269d8b531e14">getBest</a>(<span class="keywordtype">double</span>* val);</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        <span class="keywordtype">int</span> <a class="code" href="classBackTracking.html#ace4150164de295ca477c0025ece9f103">getNodes</a>(<span class="keywordtype">int</span>* nnd);</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        <span class="keywordtype">int</span> <a class="code" href="classBackTracking.html#ab63d6725673bcd8c6689569ae3e225c8">tune</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * paramfile);</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        <span class="keywordtype">int</span> <a class="code" href="classBackTracking.html#a234e2974db7ec8ae7a93eb943ac989f9">writeprob</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * modelfile);</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <span class="comment">// Static class to create objects</span></div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="comment">// Change is required only in this function to create a new object type</span></div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="keyword">template</span> &lt;<span class="keyword">class</span> M, <span class="keyword">class</span> G&gt;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <span class="keyword">static</span> <a class="code" href="classBackTracking.html#ab4d3f37d355ac5231816d8034eb09c8a">StabSolver</a> * <a class="code" href="classBackTracking.html#aeab406815f973c14f54b7182c6a743a9">create</a>(G * g, ModelerFactory&lt;M,G&gt; * fm, <span class="keywordtype">int</span> k, <span class="keywordtype">int</span> nt, <span class="keyword">const</span> <span class="keywordtype">char</span> * inparamfilename);</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;};</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">class</span> M, <span class="keyword">class</span> G&gt;</div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="code" href="classBackTracking.html#aeab406815f973c14f54b7182c6a743a9">   54</a></span>&#160;<span class="keyword">inline</span> StabSolver * <a class="code" href="classBackTracking.html#aeab406815f973c14f54b7182c6a743a9">BackTracking::create</a>(G * g, ModelerFactory&lt;M,G&gt; * fm, <span class="keywordtype">int</span> k, <span class="keywordtype">int</span> nt, <span class="keyword">const</span> <span class="keywordtype">char</span> * inparamfilename) {</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        <span class="keywordflow">return</span> nt == 1 ? <span class="keyword">new</span> <a class="code" href="classBackTracking.html#a2ac6305844013cb8dee57eff82bda42c">BackTracking</a>(g, fm) : <span class="keyword">new</span> <a class="code" href="classBackTracking.html#a2ac6305844013cb8dee57eff82bda42c">BackTracking</a>(g, fm, nt);</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;}</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* STABSOLVERS_H_ */</span><span class="preprocessor"></span></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Nov 20 2012 09:14:54 for Disjoint Stable Set Problems - Formulations by Representatives and Combinatorial Solvers by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.1
</small></address>
</body>
</html>
